class Multimedia < ActiveRecord::Base
  belongs_to :user
  belongs_to :album
  has_one :forum_topic
  has_many :votes
  has_many :histories
  
  validates_presence_of :user
  
  default_value_for :readings, 0
  default_value_for :vote, 0
    
  has_and_belongs_to_many :cores, :foreign_key => 'multimedia_id', :association_foreign_key => 'core_id'

end
